#ifndef CIVIEW_CAMERA_H
#define CIVIEW_CAMERA_H

#include "../Core/Point.h"
#include "../Core/Orientation.h"

namespace CIGui {
    class ViewHeader;
}

namespace CIView {
    /**
     * This class represents the generic perspective camera   
     **/
    class Camera {     
        //Friend classes
        friend class View;
        friend class CIGui::ViewHeader;
        friend class FeedbackTranslation;
        friend class FeedbackScaling;
        friend class FeedbackRotation;

    public:    
        typedef enum { TOP, FRONT, RIGHT, USER } CameraType;        //The possible camera types

        Camera (CameraType t);      //Constructor
        virtual ~Camera();          //Destructor   

        //CONSTANTS
        static const float WIDTH;
        static const float HEIGHT;
        static const float ZOOM;        
        static const float FOV;

        void Reset();               //Method called to reset the camera parameters

    protected:       
        const CameraType type;      //The camera's type                

        //Camera settings
        CICore::Point vrp;                  //The view reference point
        float vrpDistance;                  //The distance between camera and the VRP
        float zoom;                         //Zoom Factor value
        CICore::Orientation orientation;    //Camera orientation
        
        float zNear;                //The z-near value
        float zFar;                 //The z-far value

        //Perspective projection settings
        float fov;                  //The field of view value    
        float aspectRatio;          //The Viewport aspect ratio

        //Orthographic projection settings;
        float left;                 //The left clipping plane
        float right;                //The right clipping plane
        float bottom;               //The bottom clipping plane
        float top;                  //The top clipping plane

    };
}

#endif /* CIVIEW_CAMERA_H */
